package com.natsumehill.ls.service;

import com.alipay.sofa.runtime.api.annotation.SofaReference;
import com.alipay.sofa.runtime.api.annotation.SofaService;
import com.natsumehill.ls.dao.UserDao;
import com.natsumehill.ls.po.UserPo;
import org.springframework.stereotype.Service;

@Service
@SofaService
public class UserServiceImpl implements UserService<UserPo> {

    @SofaReference
    private UserDao userDao;

    @Override
    public UserPo queryUser(UserPo userPo) {
        return userDao.getUserByName(userPo.getName());
    }

    @Override
    public void addUser(UserPo userPo) {
        userDao.insertUser(userPo);
    }
}
